-- card: 6328 from stack: in -- bmap block id: 5940 -- flags: 0000 -- background id: 3493 -- name: pad -- part 2 (field) -- low flags: 00 -- high flags: 0002 -- rect: left=342 top=214 right=231 bottom=373 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 97 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: padchar -- part 3 (field) -- low flags: 00 -- high flags: 0002 -- rect: left=466 top=214 right=231 bottom=497 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 97 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: num -- part 4 (button) -- low flags: 00 -- high flags: A003 -- rect: left=194 top=211 right=233 bottom=273 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: PAD Right ----- HyperTalk script ----- on mouseUp put editString("pad", line 1 of field A,cd fld num, cd fld padChar, TRUE) into line 1 of field B put editString("pad", line 2 of field A,cd fld num, cd fld padChar,TRUE) into line 2 of field B end mouseUp -- part 5 (button) -- low flags: 00 -- high flags: A003 -- rect: left=101 top=211 right=233 bottom=180 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: PAD Left ----- HyperTalk script ----- on mouseUp put editString("pad", line 1 of field A,cd fld num, cd fld padChar,FALSE) into line 1 of field B put editString("pad", line 2 of field A,cd fld num, cd fld padChar,FALSE) into line 2 of field B end mouseUp -- part contents for background part 3 ----- text ----- editString("Pad", source, fieldWidth, padChar, padRight) • source is the intput variable or field containing the text • fieldWidth is the length of the desired result string • padChar is the character to pad the string with • padRight is TRUE for placing the source at the right, FALSE for left put editString("Pad", field A, 20, ".", TRUE) into field B If field A is "Hello" then the result string will be: "...............Hello" -- part contents for background part 4 ----- text ----- Hello there Bob -- part contents for card part 2 ----- text ----- . -- part contents for card part 3 ----- text ----- 35 -- part contents for background part 2 ----- text ----- PAD will add a specific character to the beginning or end of a string until a specified length is attained. This function is limited to strings only and will ignore any characters past position 255. If the length of the original source text is longer than the desired length the function will just return the original source text. -- part contents for background part 1 ----- text ----- PAD -- part contents for background part 5 ----- text ----- ........................Hello there ................................Bob